<?php
//khai bao cac object lien quan den view
$this->views["khachhang"][] = "danhsachkhachhang";
$this->views["khuvuc"][] = "danhsachkhachhang";

$this->load->model("deliman/khachhang");
$this->load->model("deliman/khuvuc");


class ModelViewDanhsachkhachhang extends Model 
{
	public function getList($where = "")
	{
		
		return "danh sach khach hang";
	}
	
	public function insertview($data)
	{
		if(count($data['khachhang']) > 0)
		{
			//insert thong tin khach hang moi vao view, voi thong tin khu vuc tu dong load	
			echo($data["khachhang"]."<br>");
			return true;
		}
		
		if(count($data['khuvuc']) > 0)
		{
			//khong lam gi ca
			return true;
		}
		return false;
	}
	
	public function updateview($data)
	{
		if(count($data['khachhang']) > 0)
		{
			//update thong tin khach hang vao view, voi thong tin khu vuc tu dong load	
			echo($data["khachhang"]."<br>");
			return true;
		}
		
		if(count($data['khuvuc']) > 0)
		{
			//update thong tin khu vuc vao view
			return true;
		}
		
		return false;
	}
	
	public function deleteview($data)
	{
		if(count($data['khachhang']) > 0)
		{
			//Xoa nhung dong khachhang id trong list	
			echo($data["khachhang"]."<br>");
			return true;
		}
		
		if(count($data['khuvuc']) > 0)
		{
			//Xoa nhung dong co khuvucid trong list
			return true;
		}
		return false;
	}
}

?>